package cn.gong.movie.ui;

import framework.annotation.ClickMethod;
import framework.base.BaseAct;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;

public class ActMain extends BaseAct {

	@Override
	public void onCreateAct(Bundle savedInstanceState) {
		super.onCreateAct(savedInstanceState);
		setContentView(R.layout.main);
	}

	@ClickMethod(R.id.main_ll_movie)
	protected void clickMovie(View view) {
		openAct(ActMovie.class);
		animTranslateRightIn();
	}

	@ClickMethod(R.id.main_ll_drama)
	protected void clickDrama(View view) {
		openAct(ActDrama.class);
		animTranslateRightIn();
	}

	@ClickMethod(R.id.main_ll_test)
	protected void clickTest(View view) {
		openAct(ActTest.class);
		animTranslateRightIn();
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK) {
			alertExit();
			return true;
		}
		return super.onKeyDown(keyCode, event);
	}
}
